﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace CSharp.Programs.SmartMediaPlayer
{
	/// <summary>
	/// Interaktionslogik für MainWindow.xaml
	/// </summary>
	public partial class MainWindow : Window
	{
		public MainWindow()
		{
			InitializeComponent();

			Loaded += MainWindow_Loaded;
		}

		void MainWindow_Loaded(object sender, RoutedEventArgs e)
		{
            //Give playercontrol to playlistcontrol ;)
            plc.VM.PlayerControl = pl;
		}

        private void pl_DoubleClick(object sender, RoutedEventArgs e)
        {
            if (pl.FullScreen)
            {
                this.WindowStyle = WindowStyle.None;
                this.WindowState = WindowState.Maximized;
				grdSplitter.Background = Brushes.Black;
				grdMain.ColumnDefinitions[0].Width = new GridLength(0);
            }
            else
            {
                this.WindowStyle = WindowStyle.SingleBorderWindow;
                this.WindowState = WindowState.Normal;
				grdSplitter.Background = Brushes.DarkCyan;
				grdMain.ColumnDefinitions[0].Width = new GridLength(250);
            }
        }
	}
}
